package com.itheima.开启多线程.卖票.线程安全问题;

/**
 * @Author 王加鑫
 * @Date 2021/5/22 14:59
 * @Version 1.0
 */
public class Demo03 {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();
        Thread thread1 = new Thread(ticket);
        Thread thread2 = new Thread(ticket);
        Thread thread3 = new Thread(ticket);

        thread1.setName("窗口一");
        thread2.setName("窗口二");
        thread3.setName("窗口三");

        thread1.start();
        thread2.start();
        thread3.start();
    }
}
